<template>
  <div class="search-wrapper">
    <div class="search-wrap">
      <div class="search-title">
        <!-- <div class="search-title-l">高级搜索</div> -->
        <div class="search-title-r">
          <span class="search-title-label">模板：</span>
          <el-select v-model="value" placeholder="请选择" @change="getOne">
            <el-option
              v-for="item in options"
                    :key="item.mobanid"
                    :label="item.mobanmc"
                    :value="item.mobanid"
            />
          </el-select>
          <el-button size="medium" @click="skipping">
            <i class="fa fa-th-list" />自定义模板新建和编辑
          </el-button>
        </div>
      </div>
      <div class="search-filter">
        <div class="search-filter-title">高级检索输入</div>
        <div class="search-filter-params">
          <div class="search-filter-params-t">
            <el-autocomplete
              v-model="state"
              :fetch-suggestions="querySearchAsync"
              placeholder="请输入内容"
              @select="handleSelect"
            />
            <el-button size="medium" type="primary" @click="gotoInfo">
              <i class="fa fa-search" />检索
            </el-button>
            <el-button size="medium">
              <i class="fa fa-trash-o" />清除全部检索条件
            </el-button>
          </div>
          <div class="search-filter-params-b">
            <el-checkbox-group
              v-model="checked"
              @change="(checked) => checkRow(checked, item)"
            >
              <el-checkbox
                v-for="item in checkList"
                :key="item.id"
                :label="item.id"
                >{{ item.name }}</el-checkbox
              >
            </el-checkbox-group>
          </div>
        </div>
        <div class="search-filter-title">检索表达式</div>
        <div class="search-filter-tips">
          <!-- <div class="search-filter-tips-text"><strong>表达式：</strong>申请人姓名='%华为%'and发明人姓名='%顾雪平%'and申请人英文名称='%b'c'vb%'and</div> -->
          <div class="search-filter-tips-text"><strong>表达式：</strong>{{this.htmlshowBDS}}</div>
          <div class="search-filter-tips-text" ref="hardBds" style="display:none">
            <i v-for="item in checkList" :key="item.id">
              <span v-if="item.checked == true"
                >{{ item.name }}=是 and</span
              >
            </i>
            <i v-for="item in xdataobj" :key="item.id">
              <span v-if="form[item.value] != undefined&&form[item.value] != ''&&item.type!='checkbox'&&item.type!='radio'&&item.type!='datetime'"
                >{{ item.label }}='%{{form[item.value]}} %'and</span
              >
              <span v-if="form[item.value] != undefined&&form[item.value] != ''&&item.type=='datetime'"
                >{{ item.label }}=BETWEEN{{form[item.value]}}and </span
              >
              <span v-if="form[item.value] != undefined&&form[item.value] != ''&&item.type=='radio'"
                >
                {{ item.label }}='{{form[item.value]}} 'and
                <i v-for="its in item.children.slice(2,item.children.length)" :key="its.label">
                  <span v-if="form[its.value] != undefined&&form[its.value] != ''"
                >{{ its.label }}='%{{form[its.value]}} %'and</span
              >
                </i>
                </span
              >
              <span v-if="item.type=='checkbox'&&form[item.value].length>0"
                >{{ item.label }}='{{form[item.value].toString()}}' and</span
              >
            </i>
          </div>
          <div class="search-filter-tips-edit" @click="editBDS">
            <i class="fa fa-pencil-square-o" /><span>编辑</span>
          </div>
        </div>
      </div>
      <div class="search-content">
        <div class="search-more-btn">
          <span>全部展开</span><i class="fa fa-angle-double-down" />
        </div>
        <el-tabs type="border-card" @tab-click="handleClick" v-model="hxactiveName">
          <el-tab-pane label="复审" name="fushen">
            <div class="search-body">
              <el-collapse v-model="activeNames">
                <el-form ref="form" :model="form" label-width="164px">
                  <div class="search-item" v-for="list in xdata">
                    <el-collapse-item name="1">
                      <template slot="title"> {{list.label}} </template>
                      <div class="search-form">
                         <el-row :gutter="10"  style="display:flex; flex-wrap: wrap;">
                         <el-col :span='12' v-for='item in list.children' :key="item.label" v-if="item.type=='text'">
                            <el-form-item :label="item.label" >
                              <el-input
                                v-model="form[item.value]"
                                placeholder="例如：2005124544124551"
                              />
                            </el-form-item>
                         </el-col>
                         <el-col :span='12' v-for='item in list.children' :key="item.label" v-if="item.type=='datetime'">
                           <el-form-item :label="item.label" > 
                              <el-date-picker
                                v-model="form[item.value]"
                                type="daterange"
                                range-separator="至"
                                start-placeholder="开始日期"
                                end-placeholder="结束日期"
                                value-format="yyyyMMdd"
                              />
                            </el-form-item>
                            </el-col>
                  
                         <el-col :span='24' v-for='item in list.children' :key="item.label" v-if="item.type=='radio'">
                           <el-form-item :label="item.label" >
                              <el-radio-group v-model="form[item.value]">
                                <el-radio
                                  v-for="items in item.children.slice(0,2)"
                                  :key="items.id"
                                  :label="items.label"
                                  >{{ items.label }}</el-radio>
                              </el-radio-group>
                                
                            </el-form-item>
                            <el-form-item :label="its.label" v-show="form[item.value]=='是'" v-for="its in item.children.slice(2,item.children.length)" :key="its.label" style="width:25%;display:inline-block">
                              <el-input
                                v-model="form[its.value]"
                                @click="qzshuanxin()"
                                placeholder="例如：2005124544124551"
                              />
                            </el-form-item>
                            </el-col>
                          
                         <el-col :span='12' v-for='item in list.children' :key="item.label" v-if="item.type=='checkbox'">
                           <el-form-item :label="item.label" >
                              <el-checkbox-group v-model="form[item.value]">
                                <el-checkbox
                                  v-for="items in item.children"
                                  :key="items.label"
                                  :label="items.label"
                                  >{{ items.label }}</el-checkbox
                                >
                              </el-checkbox-group>
                            </el-form-item>
                         </el-col>
                            </el-row>
                       
                      </div>
                    </el-collapse-item>
                  </div>
                  <el-form-item class="search-submit-btn">
                    <el-button type="primary" @click="onSubmit"
                      ><i class="fa fa-search" />检索</el-button
                    >
                    <el-button
                      ><i class="fa fa-trash-o" />清除全部检索条件</el-button
                    >
                  </el-form-item>
                </el-form>
              </el-collapse>
            </div>
          </el-tab-pane>
          <el-tab-pane label="无效" name="wuxiao">
            <div class="search-body">
              <el-collapse v-model="activeNames">
                <el-form ref="form" :model="form" label-width="164px">
                  <div class="search-item">
                    <el-collapse-item name="1">
                      <template slot="title"> 5专利著录项目 </template>
                      <div class="search-form">
                        <el-row :gutter="24">
                          <el-col :span="12">
                            <el-form-item label="申请号：">
                              <el-input
                                v-model="form.name"
                                placeholder="例如：2005124544124551"
                              />
                            </el-form-item>
                            <el-form-item label="其他分类号：">
                              <el-input
                                v-model="form.name"
                                placeholder="例如：F02N 15/02/"
                              />
                            </el-form-item>
                            <el-form-item label="发明名称：">
                              <el-input
                                v-model="form.name"
                                placeholder="例如：计算机"
                              />
                            </el-form-item>
                            <el-form-item label="公开公告日：">
                              <el-date-picker
                                v-model="form.date"
                                type="daterange"
                                range-separator="至"
                                start-placeholder="开始日期"
                                end-placeholder="结束日期"
                              />
                            </el-form-item>
                            <el-form-item label="国别省市代码：">
                              <el-input
                                v-model="form.name"
                                placeholder="例如：中国"
                              />
                            </el-form-item>
                            <el-form-item label="申请人姓名：">
                              <el-input
                                v-model="form.name"
                                placeholder="例如：华为"
                              />
                            </el-form-item>
                            <el-form-item label="申请人类型：">
                              <el-input
                                v-model="form.name"
                                placeholder="例如：公司"
                              />
                            </el-form-item>
                            <el-form-item label="申请人省份：">
                              <el-input
                                v-model="form.name"
                                placeholder="例如：河北"
                              />
                            </el-form-item>
                            <el-form-item label="发明人姓名：">
                              <el-input
                                v-model="form.name"
                                placeholder="例如：顾雪平"
                              />
                            </el-form-item>
                            <el-form-item label="发明人国别：">
                              <el-input
                                v-model="form.name"
                                placeholder="例如：中国"
                              />
                            </el-form-item>
                            <el-form-item label="专利类型：">
                              <el-checkbox-group v-model="form.zhuanliArr">
                                <el-checkbox
                                  v-for="item in zhuanliList"
                                  :key="item.id"
                                  :label="item.id"
                                  >{{ item.name }}</el-checkbox
                                >
                              </el-checkbox-group>
                            </el-form-item>
                            <el-form-item label="是否有优先权：">
                              <el-radio-group v-model="form.radio">
                                <el-radio
                                  v-for="item in radioArr"
                                  :key="item.id"
                                  :label="item.id"
                                  >{{ item.value }}</el-radio
                                >
                              </el-radio-group>
                            </el-form-item>
                            <el-form-item label="是否为分案母案申请：">
                              <el-radio-group v-model="form.radio">
                                <el-radio
                                  v-for="item in radioArr"
                                  :key="item.id"
                                  :label="item.id"
                                  >{{ item.value }}</el-radio
                                >
                              </el-radio-group>
                            </el-form-item>
                            <el-form-item label="是否为PCT申请：">
                              <el-radio-group v-model="form.radio">
                                <el-radio
                                  v-for="item in radioArr"
                                  :key="item.id"
                                  :label="item.id"
                                  >{{ item.value }}</el-radio
                                >
                              </el-radio-group>
                            </el-form-item>
                          </el-col>
                          <el-col :span="12">
                            <el-form-item label="主分类号：">
                              <el-input
                                v-model="form.name"
                                placeholder="例如：E04G 9/08"
                              />
                            </el-form-item>
                            <el-form-item label="申请日：">
                              <el-date-picker
                                v-model="form.date"
                                type="daterange"
                                range-separator="至"
                                start-placeholder="开始日期"
                                end-placeholder="结束日期"
                              />
                            </el-form-item>
                            <el-form-item label="公开公告号：">
                              <el-input
                                v-model="form.name"
                                placeholder="例如：E04G 9/08"
                              />
                            </el-form-item>
                            <el-form-item label="法律状态：">
                              <el-input
                                v-model="form.name"
                                placeholder="例如：E04G 9/08"
                              />
                            </el-form-item>
                            <el-form-item label=" " />
                            <el-form-item label="请输入英文名称：">
                              <el-input
                                v-model="form.name"
                                placeholder="例如：E04G 9/08"
                              />
                            </el-form-item>
                            <el-form-item label="申请人国别：">
                              <el-input
                                v-model="form.name"
                                placeholder="例如：E04G 9/08"
                              />
                            </el-form-item>
                            <el-form-item label="申请人城市：">
                              <el-input
                                v-model="form.name"
                                placeholder="例如：E04G 9/08"
                              />
                            </el-form-item>
                            <el-form-item label="发明人英文名称：">
                              <el-input
                                v-model="form.name"
                                placeholder="例如：E04G 9/08"
                              />
                            </el-form-item>
                            <el-form-item label=" " />
                            <el-form-item label=" " />
                            <el-form-item label="有无专利代理：">
                              <el-radio-group v-model="form.radio">
                                <el-radio
                                  v-for="item in radioArr"
                                  :key="item.id"
                                  :label="item.id"
                                  >{{ item.value }}</el-radio
                                >
                              </el-radio-group>
                            </el-form-item>
                            <el-form-item label="著录项目是否变更：">
                              <el-radio-group v-model="form.radio">
                                <el-radio
                                  v-for="item in radioArr"
                                  :key="item.id"
                                  :label="item.id"
                                  >{{ item.value }}</el-radio
                                >
                              </el-radio-group>
                            </el-form-item>
                          </el-col>
                        </el-row>
                      </div>
                    </el-collapse-item>
                  </div>
                  <div class="search-item">
                    <el-collapse-item name="2">
                      <template slot="title"> 专利申请文本 </template>
                      <div class="search-form">
                        <el-row :gutter="24">
                          <el-col :span="12">
                            <el-form-item label="申请号：">
                              <el-input
                                v-model="form.name"
                                placeholder="例如：2005124544124551"
                              />
                            </el-form-item>
                            <el-form-item label="其他分类号：">
                              <el-input
                                v-model="form.name"
                                placeholder="例如：F02N 15/02/"
                              />
                            </el-form-item>
                            <el-form-item label="发明名称：">
                              <el-input
                                v-model="form.name"
                                placeholder="例如：计算机"
                              />
                            </el-form-item>
                            <el-form-item label="公开公告日：">
                              <el-date-picker
                                v-model="form.date"
                                type="daterange"
                                range-separator="至"
                                start-placeholder="开始日期"
                                end-placeholder="结束日期"
                              />
                            </el-form-item>
                            <el-form-item label="国别省市代码：">
                              <el-input
                                v-model="form.name"
                                placeholder="例如：中国"
                              />
                            </el-form-item>
                            <el-form-item label="申请人姓名：">
                              <el-input
                                v-model="form.name"
                                placeholder="例如：华为"
                              />
                            </el-form-item>
                            <el-form-item label="申请人类型：">
                              <el-input
                                v-model="form.name"
                                placeholder="例如：公司"
                              />
                            </el-form-item>
                            <el-form-item label="申请人省份：">
                              <el-input
                                v-model="form.name"
                                placeholder="例如：河北"
                              />
                            </el-form-item>
                            <el-form-item label="发明人姓名：">
                              <el-input
                                v-model="form.name"
                                placeholder="例如：顾雪平"
                              />
                            </el-form-item>
                            <el-form-item label="发明人国别：">
                              <el-input
                                v-model="form.name"
                                placeholder="例如：中国"
                              />
                            </el-form-item>
                            <el-form-item label="专利类型：">
                              <el-checkbox-group v-model="form.zhuanliArr">
                                <el-checkbox
                                  v-for="item in zhuanliList"
                                  :key="item.id"
                                  :label="item.id"
                                  >{{ item.name }}</el-checkbox
                                >
                              </el-checkbox-group>
                            </el-form-item>
                            <el-form-item label="是否有优先权：">
                              <el-radio-group v-model="form.radio">
                                <el-radio
                                  v-for="item in radioArr"
                                  :key="item.id"
                                  :label="item.id"
                                  >{{ item.value }}</el-radio
                                >
                              </el-radio-group>
                            </el-form-item>
                            <el-form-item label="是否为分案母案申请：">
                              <el-radio-group v-model="form.radio">
                                <el-radio
                                  v-for="item in radioArr"
                                  :key="item.id"
                                  :label="item.id"
                                  >{{ item.value }}</el-radio
                                >
                              </el-radio-group>
                            </el-form-item>
                            <el-form-item label="是否为PCT申请：">
                              <el-radio-group v-model="form.radio">
                                <el-radio
                                  v-for="item in radioArr"
                                  :key="item.id"
                                  :label="item.id"
                                  >{{ item.value }}</el-radio
                                >
                              </el-radio-group>
                            </el-form-item>
                          </el-col>
                          <el-col :span="12">
                            <el-form-item label="主分类号：">
                              <el-input
                                v-model="form.name"
                                placeholder="例如：E04G 9/08"
                              />
                            </el-form-item>
                            <el-form-item label="申请日：">
                              <el-date-picker
                                v-model="form.date"
                                type="daterange"
                                range-separator="至"
                                start-placeholder="开始日期"
                                end-placeholder="结束日期"
                              />
                            </el-form-item>
                            <el-form-item label="公开公告号：">
                              <el-input
                                v-model="form.name"
                                placeholder="例如：E04G 9/08"
                              />
                            </el-form-item>
                            <el-form-item label="法律状态：">
                              <el-input
                                v-model="form.name"
                                placeholder="例如：E04G 9/08"
                              />
                            </el-form-item>
                            <el-form-item label=" " />
                            <el-form-item label="请输入英文名称：">
                              <el-input
                                v-model="form.name"
                                placeholder="例如：E04G 9/08"
                              />
                            </el-form-item>
                            <el-form-item label="申请人国别：">
                              <el-input
                                v-model="form.name"
                                placeholder="例如：E04G 9/08"
                              />
                            </el-form-item>
                            <el-form-item label="申请人城市：">
                              <el-input
                                v-model="form.name"
                                placeholder="例如：E04G 9/08"
                              />
                            </el-form-item>
                            <el-form-item label="发明人英文名称：">
                              <el-input
                                v-model="form.name"
                                placeholder="例如：E04G 9/08"
                              />
                            </el-form-item>
                            <el-form-item label=" " />
                            <el-form-item label=" " />
                            <el-form-item label="有无专利代理：">
                              <el-radio-group v-model="form.radio">
                                <el-radio
                                  v-for="item in radioArr"
                                  :key="item.id"
                                  :label="item.id"
                                  >{{ item.value }}</el-radio
                                >
                              </el-radio-group>
                            </el-form-item>
                            <el-form-item label="著录项目是否变更：">
                              <el-radio-group v-model="form.radio">
                                <el-radio
                                  v-for="item in radioArr"
                                  :key="item.id"
                                  :label="item.id"
                                  >{{ item.value }}</el-radio
                                >
                              </el-radio-group>
                            </el-form-item>
                          </el-col>
                        </el-row>
                      </div>
                    </el-collapse-item>
                  </div>
                  <el-form-item class="search-submit-btn">
                    <el-button type="primary" @click="onSubmit"
                      ><i class="fa fa-search" />检索</el-button
                    >
                    <el-button
                      ><i class="fa fa-trash-o" />清除全部检索条件</el-button
                    >
                  </el-form-item>
                </el-form>
              </el-collapse>
            </div>
          </el-tab-pane>
          <el-tab-pane label="外观无效" name="waiguan"> 
            <div class="search-body">
              <el-collapse v-model="activeNames">
                <el-form ref="form" :model="form" label-width="164px">
                  <div class="search-item">
                    <el-collapse-item name="1">
                      <template slot="title"> 3专利著录项目 </template>
                      <div class="search-form">
                        <el-row :gutter="24">
                          <el-col :span="12">
                            <el-form-item label="申请号：">
                              <el-input
                                v-model="form.name"
                                placeholder="例如：2005124544124551"
                              />
                            </el-form-item>
                            <el-form-item label="其他分类号：">
                              <el-input
                                v-model="form.name"
                                placeholder="例如：F02N 15/02/"
                              />
                            </el-form-item>
                            <el-form-item label="发明名称：">
                              <el-input
                                v-model="form.name"
                                placeholder="例如：计算机"
                              />
                            </el-form-item>
                            <el-form-item label="公开公告日：">
                              <el-date-picker
                                v-model="form.date"
                                type="daterange"
                                range-separator="至"
                                start-placeholder="开始日期"
                                end-placeholder="结束日期"
                              />
                            </el-form-item>
                            <el-form-item label="国别省市代码：">
                              <el-input
                                v-model="form.name"
                                placeholder="例如：中国"
                              />
                            </el-form-item>
                            <el-form-item label="申请人姓名：">
                              <el-input
                                v-model="form.name"
                                placeholder="例如：华为"
                              />
                            </el-form-item>
                            <el-form-item label="申请人类型：">
                              <el-input
                                v-model="form.name"
                                placeholder="例如：公司"
                              />
                            </el-form-item>
                            <el-form-item label="申请人省份：">
                              <el-input
                                v-model="form.name"
                                placeholder="例如：河北"
                              />
                            </el-form-item>
                            <el-form-item label="发明人姓名：">
                              <el-input
                                v-model="form.name"
                                placeholder="例如：顾雪平"
                              />
                            </el-form-item>
                            <el-form-item label="发明人国别：">
                              <el-input
                                v-model="form.name"
                                placeholder="例如：中国"
                              />
                            </el-form-item>
                            <el-form-item label="专利类型：">
                              <el-checkbox-group v-model="form.zhuanliArr">
                                <el-checkbox
                                  v-for="item in zhuanliList"
                                  :key="item.id"
                                  :label="item.id"
                                  >{{ item.name }}</el-checkbox
                                >
                              </el-checkbox-group>
                            </el-form-item>
                            <el-form-item label="是否有优先权：">
                              <el-radio-group v-model="form.radio">
                                <el-radio
                                  v-for="item in radioArr"
                                  :key="item.id"
                                  :label="item.id"
                                  >{{ item.value }}</el-radio
                                >
                              </el-radio-group>
                            </el-form-item>
                            <el-form-item label="是否为分案母案申请：">
                              <el-radio-group v-model="form.radio">
                                <el-radio
                                  v-for="item in radioArr"
                                  :key="item.id"
                                  :label="item.id"
                                  >{{ item.value }}</el-radio
                                >
                              </el-radio-group>
                            </el-form-item>
                            <el-form-item label="是否为PCT申请：">
                              <el-radio-group v-model="form.radio">
                                <el-radio
                                  v-for="item in radioArr"
                                  :key="item.id"
                                  :label="item.id"
                                  >{{ item.value }}</el-radio
                                >
                              </el-radio-group>
                            </el-form-item>
                          </el-col>
                          <el-col :span="12">
                            <el-form-item label="主分类号：">
                              <el-input
                                v-model="form.name"
                                placeholder="例如：E04G 9/08"
                              />
                            </el-form-item>
                            <el-form-item label="申请日：">
                              <el-date-picker
                                v-model="form.date"
                                type="daterange"
                                range-separator="至"
                                start-placeholder="开始日期"
                                end-placeholder="结束日期"
                              />
                            </el-form-item>
                            <el-form-item label="公开公告号：">
                              <el-input
                                v-model="form.name"
                                placeholder="例如：E04G 9/08"
                              />
                            </el-form-item>
                            <el-form-item label="法律状态：">
                              <el-input
                                v-model="form.name"
                                placeholder="例如：E04G 9/08"
                              />
                            </el-form-item>
                            <el-form-item label=" " />
                            <el-form-item label="请输入英文名称：">
                              <el-input
                                v-model="form.name"
                                placeholder="例如：E04G 9/08"
                              />
                            </el-form-item>
                            <el-form-item label="申请人国别：">
                              <el-input
                                v-model="form.name"
                                placeholder="例如：E04G 9/08"
                              />
                            </el-form-item>
                            <el-form-item label="申请人城市：">
                              <el-input
                                v-model="form.name"
                                placeholder="例如：E04G 9/08"
                              />
                            </el-form-item>
                            <el-form-item label="发明人英文名称：">
                              <el-input
                                v-model="form.name"
                                placeholder="例如：E04G 9/08"
                              />
                            </el-form-item>
                            <el-form-item label=" " />
                            <el-form-item label=" " />
                            <el-form-item label="有无专利代理：">
                              <el-radio-group v-model="form.radio">
                                <el-radio
                                  v-for="item in radioArr"
                                  :key="item.id"
                                  :label="item.id"
                                  >{{ item.value }}</el-radio
                                >
                              </el-radio-group>
                            </el-form-item>
                            <el-form-item label="著录项目是否变更：">
                              <el-radio-group v-model="form.radio">
                                <el-radio
                                  v-for="item in radioArr"
                                  :key="item.id"
                                  :label="item.id"
                                  >{{ item.value }}</el-radio
                                >
                              </el-radio-group>
                            </el-form-item>
                          </el-col>
                        </el-row>
                      </div>
                    </el-collapse-item>
                  </div>
                  <div class="search-item">
                    <el-collapse-item name="2">
                      <template slot="title"> 专利申请文本 </template>
                      <div class="search-form">
                        <el-row :gutter="24">
                          <el-col :span="12">
                            <el-form-item label="申请号：">
                              <el-input
                                v-model="form.name"
                                placeholder="例如：2005124544124551"
                              />
                            </el-form-item>
                            <el-form-item label="其他分类号：">
                              <el-input
                                v-model="form.name"
                                placeholder="例如：F02N 15/02/"
                              />
                            </el-form-item>
                            <el-form-item label="发明名称：">
                              <el-input
                                v-model="form.name"
                                placeholder="例如：计算机"
                              />
                            </el-form-item>
                            <el-form-item label="公开公告日：">
                              <el-date-picker
                                v-model="form.date"
                                type="daterange"
                                range-separator="至"
                                start-placeholder="开始日期"
                                end-placeholder="结束日期"
                              />
                            </el-form-item>
                            <el-form-item label="国别省市代码：">
                              <el-input
                                v-model="form.name"
                                placeholder="例如：中国"
                              />
                            </el-form-item>
                            <el-form-item label="申请人姓名：">
                              <el-input
                                v-model="form.name"
                                placeholder="例如：华为"
                              />
                            </el-form-item>
                            <el-form-item label="申请人类型：">
                              <el-input
                                v-model="form.name"
                                placeholder="例如：公司"
                              />
                            </el-form-item>
                            <el-form-item label="申请人省份：">
                              <el-input
                                v-model="form.name"
                                placeholder="例如：河北"
                              />
                            </el-form-item>
                            <el-form-item label="发明人姓名：">
                              <el-input
                                v-model="form.name"
                                placeholder="例如：顾雪平"
                              />
                            </el-form-item>
                            <el-form-item label="发明人国别：">
                              <el-input
                                v-model="form.name"
                                placeholder="例如：中国"
                              />
                            </el-form-item>
                            <el-form-item label="专利类型：">
                              <el-checkbox-group v-model="form.zhuanliArr">
                                <el-checkbox
                                  v-for="item in zhuanliList"
                                  :key="item.id"
                                  :label="item.id"
                                  >{{ item.name }}</el-checkbox
                                >
                              </el-checkbox-group>
                            </el-form-item>
                            <el-form-item label="是否有优先权：">
                              <el-radio-group v-model="form.radio">
                                <el-radio
                                  v-for="item in radioArr"
                                  :key="item.id"
                                  :label="item.id"
                                  >{{ item.value }}</el-radio
                                >
                              </el-radio-group>
                            </el-form-item>
                            <el-form-item label="是否为分案母案申请：">
                              <el-radio-group v-model="form.radio">
                                <el-radio
                                  v-for="item in radioArr"
                                  :key="item.id"
                                  :label="item.id"
                                  >{{ item.value }}</el-radio
                                >
                              </el-radio-group>
                            </el-form-item>
                            <el-form-item label="是否为PCT申请：">
                              <el-radio-group v-model="form.radio">
                                <el-radio
                                  v-for="item in radioArr"
                                  :key="item.id"
                                  :label="item.id"
                                  >{{ item.value }}</el-radio
                                >
                              </el-radio-group>
                            </el-form-item>
                          </el-col>
                          <el-col :span="12">
                            <el-form-item label="主分类号：">
                              <el-input
                                v-model="form.name"
                                placeholder="例如：E04G 9/08"
                              />
                            </el-form-item>
                            <el-form-item label="申请日：">
                              <el-date-picker
                                v-model="form.date"
                                type="daterange"
                                range-separator="至"
                                start-placeholder="开始日期"
                                end-placeholder="结束日期"
                              />
                            </el-form-item>
                            <el-form-item label="公开公告号：">
                              <el-input
                                v-model="form.name"
                                placeholder="例如：E04G 9/08"
                              />
                            </el-form-item>
                            <el-form-item label="法律状态：">
                              <el-input
                                v-model="form.name"
                                placeholder="例如：E04G 9/08"
                              />
                            </el-form-item>
                            <el-form-item label=" " />
                            <el-form-item label="请输入英文名称：">
                              <el-input
                                v-model="form.name"
                                placeholder="例如：E04G 9/08"
                              />
                            </el-form-item>
                            <el-form-item label="申请人国别：">
                              <el-input
                                v-model="form.name"
                                placeholder="例如：E04G 9/08"
                              />
                            </el-form-item>
                            <el-form-item label="申请人城市：">
                              <el-input
                                v-model="form.name"
                                placeholder="例如：E04G 9/08"
                              />
                            </el-form-item>
                            <el-form-item label="发明人英文名称：">
                              <el-input
                                v-model="form.name"
                                placeholder="例如：E04G 9/08"
                              />
                            </el-form-item>
                            <el-form-item label=" " />
                            <el-form-item label=" " />
                            <el-form-item label="有无专利代理：">
                              <el-radio-group v-model="form.radio">
                                <el-radio
                                  v-for="item in radioArr"
                                  :key="item.id"
                                  :label="item.id"
                                  >{{ item.value }}</el-radio
                                >
                              </el-radio-group>
                            </el-form-item>
                            <el-form-item label="著录项目是否变更：">
                              <el-radio-group v-model="form.radio">
                                <el-radio
                                  v-for="item in radioArr"
                                  :key="item.id"
                                  :label="item.id"
                                  >{{ item.value }}</el-radio
                                >
                              </el-radio-group>
                            </el-form-item>
                          </el-col>
                        </el-row>
                      </div>
                    </el-collapse-item>
                  </div>
                  <el-form-item class="search-submit-btn">
                    <el-button type="primary" @click="onSubmit"
                      ><i class="fa fa-search" />检索</el-button
                    >
                    <el-button
                      ><i class="fa fa-trash-o" />清除全部检索条件</el-button
                    >
                  </el-form-item>
                </el-form>
              </el-collapse>
            </div>
          </el-tab-pane>
          <el-tab-pane label="司法判决" name="sifa">
            <div class="search-body">
              <el-collapse v-model="activeNames">
                <el-form ref="form" :model="form" label-width="164px">
                  <div class="search-item">
                    <el-collapse-item name="1">
                      <template slot="title"> 4专利著录项目 </template>
                      <div class="search-form">
                        <el-row :gutter="24" >
                          <el-col :span="12">
                            <el-form-item label="申请号：">
                              <el-input
                                v-model="form.name"
                                placeholder="例如：2005124544124551"
                              />
                            </el-form-item>
                            <el-form-item label="其他分类号：">
                              <el-input
                                v-model="form.name"
                                placeholder="例如：F02N 15/02/"
                              />
                            </el-form-item>
                            <el-form-item label="发明名称：">
                              <el-input
                                v-model="form.name"
                                placeholder="例如：计算机"
                              />
                            </el-form-item>
                            <el-form-item label="公开公告日：">
                              <el-date-picker
                                v-model="form.date"
                                type="daterange"
                                range-separator="至"
                                start-placeholder="开始日期"
                                end-placeholder="结束日期"
                              />
                            </el-form-item>
                            <el-form-item label="国别省市代码：">
                              <el-input
                                v-model="form.name"
                                placeholder="例如：中国"
                              />
                            </el-form-item>
                            <el-form-item label="申请人姓名：">
                              <el-input
                                v-model="form.name"
                                placeholder="例如：华为"
                              />
                            </el-form-item>
                            <el-form-item label="申请人类型：">
                              <el-input
                                v-model="form.name"
                                placeholder="例如：公司"
                              />
                            </el-form-item>
                            <el-form-item label="申请人省份：">
                              <el-input
                                v-model="form.name"
                                placeholder="例如：河北"
                              />
                            </el-form-item>
                            <el-form-item label="发明人姓名：">
                              <el-input
                                v-model="form.name"
                                placeholder="例如：顾雪平"
                              />
                            </el-form-item>
                            <el-form-item label="发明人国别：">
                              <el-input
                                v-model="form.name"
                                placeholder="例如：中国"
                              />
                            </el-form-item>
                            <el-form-item label="专利类型：">
                              <el-checkbox-group v-model="form.zhuanliArr">
                                <el-checkbox
                                  v-for="item in zhuanliList"
                                  :key="item.id"
                                  :label="item.id"
                                  >{{ item.name }}</el-checkbox
                                >
                              </el-checkbox-group>
                            </el-form-item>
                            <el-form-item label="是否有优先权：">
                              <el-radio-group v-model="form.radio">
                                <el-radio
                                  v-for="item in radioArr"
                                  :key="item.id"
                                  :label="item.id"
                                  >{{ item.value }}</el-radio
                                >
                              </el-radio-group>
                            </el-form-item>
                            <el-form-item label="是否为分案母案申请：">
                              <el-radio-group v-model="form.radio">
                                <el-radio
                                  v-for="item in radioArr"
                                  :key="item.id"
                                  :label="item.id"
                                  >{{ item.value }}</el-radio
                                >
                              </el-radio-group>
                            </el-form-item>
                            <el-form-item label="是否为PCT申请：">
                              <el-radio-group v-model="form.radio">
                                <el-radio
                                  v-for="item in radioArr"
                                  :key="item.id"
                                  :label="item.id"
                                  >{{ item.value }}</el-radio
                                >
                              </el-radio-group>
                            </el-form-item>
                          </el-col>
                          <el-col :span="12">
                            <el-form-item label="主分类号：">
                              <el-input
                                v-model="form.name"
                                placeholder="例如：E04G 9/08"
                              />
                            </el-form-item>
                            <el-form-item label="申请日：">
                              <el-date-picker
                                v-model="form.date"
                                type="daterange"
                                range-separator="至"
                                start-placeholder="开始日期"
                                end-placeholder="结束日期"
                              />
                            </el-form-item>
                            <el-form-item label="公开公告号：">
                              <el-input
                                v-model="form.name"
                                placeholder="例如：E04G 9/08"
                              />
                            </el-form-item>
                            <el-form-item label="法律状态：">
                              <el-input
                                v-model="form.name"
                                placeholder="例如：E04G 9/08"
                              />
                            </el-form-item>
                            <el-form-item label=" " />
                            <el-form-item label="请输入英文名称：">
                              <el-input
                                v-model="form.name"
                                placeholder="例如：E04G 9/08"
                              />
                            </el-form-item>
                            <el-form-item label="申请人国别：">
                              <el-input
                                v-model="form.name"
                                placeholder="例如：E04G 9/08"
                              />
                            </el-form-item>
                            <el-form-item label="申请人城市：">
                              <el-input
                                v-model="form.name"
                                placeholder="例如：E04G 9/08"
                              />
                            </el-form-item>
                            <el-form-item label="发明人英文名称：">
                              <el-input
                                v-model="form.name"
                                placeholder="例如：E04G 9/08"
                              />
                            </el-form-item>
                            <el-form-item label=" " />
                            <el-form-item label=" " />
                            <el-form-item label="有无专利代理：">
                              <el-radio-group v-model="form.radio">
                                <el-radio
                                  v-for="item in radioArr"
                                  :key="item.id"
                                  :label="item.id"
                                  >{{ item.value }}</el-radio
                                >
                              </el-radio-group>
                            </el-form-item>
                            <el-form-item label="著录项目是否变更：">
                              <el-radio-group v-model="form.radio">
                                <el-radio
                                  v-for="item in radioArr"
                                  :key="item.id"
                                  :label="item.id"
                                  >{{ item.value }}</el-radio
                                >
                              </el-radio-group>
                            </el-form-item>
                          </el-col>
                        </el-row>
                      </div>
                    </el-collapse-item>
                  </div>
                  <div class="search-item">
                    <el-collapse-item name="2">
                      <template slot="title"> 专利申请文本 </template>
                      <div class="search-form">
                        <el-row :gutter="24">
                          <el-col :span="12">
                            <el-form-item label="申请号：">
                              <el-input
                                v-model="form.name"
                                placeholder="例如：2005124544124551"
                              />
                            </el-form-item>
                            <el-form-item label="其他分类号：">
                              <el-input
                                v-model="form.name"
                                placeholder="例如：F02N 15/02/"
                              />
                            </el-form-item>
                            <el-form-item label="发明名称：">
                              <el-input
                                v-model="form.name"
                                placeholder="例如：计算机"
                              />
                            </el-form-item>
                            <el-form-item label="公开公告日：">
                              <el-date-picker
                                v-model="form.date"
                                type="daterange"
                                range-separator="至"
                                start-placeholder="开始日期"
                                end-placeholder="结束日期"
                              />
                            </el-form-item>
                            <el-form-item label="国别省市代码：">
                              <el-input
                                v-model="form.name"
                                placeholder="例如：中国"
                              />
                            </el-form-item>
                            <el-form-item label="申请人姓名：">
                              <el-input
                                v-model="form.name"
                                placeholder="例如：华为"
                              />
                            </el-form-item>
                            <el-form-item label="申请人类型：">
                              <el-input
                                v-model="form.name"
                                placeholder="例如：公司"
                              />
                            </el-form-item>
                            <el-form-item label="申请人省份：">
                              <el-input
                                v-model="form.name"
                                placeholder="例如：河北"
                              />
                            </el-form-item>
                            <el-form-item label="发明人姓名：">
                              <el-input
                                v-model="form.name"
                                placeholder="例如：顾雪平"
                              />
                            </el-form-item>
                            <el-form-item label="发明人国别：">
                              <el-input
                                v-model="form.name"
                                placeholder="例如：中国"
                              />
                            </el-form-item>
                            <el-form-item label="专利类型：">
                              <el-checkbox-group v-model="form.zhuanliArr">
                                <el-checkbox
                                  v-for="item in zhuanliList"
                                  :key="item.id"
                                  :label="item.id"
                                  >{{ item.name }}</el-checkbox
                                >
                              </el-checkbox-group>
                            </el-form-item>
                            <el-form-item label="是否有优先权：">
                              <el-radio-group v-model="form.radio">
                                <el-radio
                                  v-for="item in radioArr"
                                  :key="item.id"
                                  :label="item.id"
                                  >{{ item.value }}</el-radio
                                >
                              </el-radio-group>
                            </el-form-item>
                            <el-form-item label="是否为分案母案申请：">
                              <el-radio-group v-model="form.radio">
                                <el-radio
                                  v-for="item in radioArr"
                                  :key="item.id"
                                  :label="item.id"
                                  >{{ item.value }}</el-radio
                                >
                              </el-radio-group>
                            </el-form-item>
                            <el-form-item label="是否为PCT申请：">
                              <el-radio-group v-model="form.radio">
                                <el-radio
                                  v-for="item in radioArr"
                                  :key="item.id"
                                  :label="item.id"
                                  >{{ item.value }}</el-radio
                                >
                              </el-radio-group>
                            </el-form-item>
                          </el-col>
                          <el-col :span="12">
                            <el-form-item label="主分类号：">
                              <el-input
                                v-model="form.name"
                                placeholder="例如：E04G 9/08"
                              />
                            </el-form-item>
                            <el-form-item label="申请日：">
                              <el-date-picker
                                v-model="form.date"
                                type="daterange"
                                range-separator="至"
                                start-placeholder="开始日期"
                                end-placeholder="结束日期"
                              />
                            </el-form-item>
                            <el-form-item label="公开公告号：">
                              <el-input
                                v-model="form.name"
                                placeholder="例如：E04G 9/08"
                              />
                            </el-form-item>
                            <el-form-item label="法律状态：">
                              <el-input
                                v-model="form.name"
                                placeholder="例如：E04G 9/08"
                              />
                            </el-form-item>
                            <el-form-item label=" " />
                            <el-form-item label="请输入英文名称：">
                              <el-input
                                v-model="form.name"
                                placeholder="例如：E04G 9/08"
                              />
                            </el-form-item>
                            <el-form-item label="申请人国别：">
                              <el-input
                                v-model="form.name"
                                placeholder="例如：E04G 9/08"
                              />
                            </el-form-item>
                            <el-form-item label="申请人城市：">
                              <el-input
                                v-model="form.name"
                                placeholder="例如：E04G 9/08"
                              />
                            </el-form-item>
                            <el-form-item label="发明人英文名称：">
                              <el-input
                                v-model="form.name"
                                placeholder="例如：E04G 9/08"
                              />
                            </el-form-item>
                            <el-form-item label=" " />
                            <el-form-item label=" " />
                            <el-form-item label="有无专利代理：">
                              <el-radio-group v-model="form.radio">
                                <el-radio
                                  v-for="item in radioArr"
                                  :key="item.id"
                                  :label="item.id"
                                  >{{ item.value }}</el-radio
                                >
                              </el-radio-group>
                            </el-form-item>
                            <el-form-item label="著录项目是否变更：">
                              <el-radio-group v-model="form.radio">
                                <el-radio
                                  v-for="item in radioArr"
                                  :key="item.id"
                                  :label="item.id"
                                  >{{ item.value }}</el-radio
                                >
                              </el-radio-group>
                            </el-form-item>
                          </el-col>
                        </el-row>
                      </div>
                    </el-collapse-item>
                  </div>
                  <el-form-item class="search-submit-btn">
                    <el-button type="primary" @click="onSubmit"
                      ><i class="fa fa-search" />检索</el-button
                    >
                    <el-button
                      ><i class="fa fa-trash-o" />清除全部检索条件</el-button
                    >
                  </el-form-item>
                </el-form>
              </el-collapse>
            </div>
          </el-tab-pane>
        </el-tabs>
      </div>
    </div>
<!-- 检索表达式 -->
   <el-dialog title="检索表达式" :visible.sync="dialogFormVisible">
     <el-button  @click="BtnClick('+')">+</el-button>
     <el-button  @click="BtnClick('-')">-</el-button>
     <el-button  @click="BtnClick('AND')">AND</el-button>
     <el-button  @click="BtnClick('OR')">OR</el-button>
     <el-button  @click="BtnClick('=')">=</el-button>
     <el-button  @click="BtnClick('(')">(</el-button>
     <el-button  @click="BtnClick(')')">)</el-button>
     <el-button  @click="BtnClick('<>')"> <> </el-button>
  <el-form :model="DialogForm" style="margin:10px">
    <el-form-item label="活动名称" label-width="120px">
      <el-input v-model="DialogForm.name" autocomplete="off" type="textarea"></el-input>
    </el-form-item>
  </el-form>
  <div slot="footer" class="dialog-footer">
    <el-button @click="dialogFormVisible = false">取 消</el-button>
    <el-button type="primary" @click="dialogFormVisible = false">确 定</el-button>
  </div>
</el-dialog>
<!-- 检索表达式 -->
    <!-- 右侧悬浮框 -->
    <div
      v-if="showMe==false"
      style="
        height: 50px;
        width: 50px;
        background-color: #1989fa;
        color:#fff;
        box-shadow: 0 0 6px rgba(0, 0, 0, 0.12);
        position: fixed;
        right: 5px;
        bottom: 180px;
        border-radius: 20px;
        line-height: 48px;
        text-align: center;
        cursor: pointer;
      "
      @click="xRightClick"
    >
      检索
    </div>
    <div
      v-if="showMe==true"
      style="
        width: 350px;
        background-color:#fff;
        color:#333;
        box-shadow: 0 0 6px rgba(0, 0, 0, 0.12);
        position: fixed;
        right: 5px;
        bottom: 30px;
        cursor: pointer;
        padding:10px
      "
      @click="xRightClick"
    >
      <div>表达式：</div>
            <div v-for="item in checkList" :key="item.id">
              <span v-show="item.checked == true"
                >{{ item.name }}=true </span
              >
            </div>
            <el-form ref="form">
               <el-row :gutter="10"  >
                         <el-col :span='24' v-for='item in xdataobj' :key="item.label">
                            <el-form-item :label="item.label" v-if="item.type=='text'&&form[item.value]!=''">
                              <el-input
                                v-model="form[item.value]"
                                placeholder="例如：2005124544124551"
                              />
                            </el-form-item>
                           <el-form-item :label="item.label" v-if="item.type=='datetime'&&form[item.value]!=''"> 
                              <el-date-picker
                                v-model="form[item.value]"
                                type="daterange"
                                range-separator="至"
                                start-placeholder="开始日期"
                                end-placeholder="结束日期"
                              />
                            </el-form-item>
                           <el-form-item :label="item.label" v-if="item.type=='radio'&&form[item.value]!=''">
                              <el-radio-group v-model="form[item.value]">
                                <el-radio
                                  v-for="items in item.children"
                                  :key="items.id"
                                  :label="items.label"
                                  >{{ items.label }}</el-radio>
                              </el-radio-group>
                              <el-form-item :label="its.label" v-show="form[item.value]=='是'" v-for="its in item.children.slice(2,item.children.length)" :key="its.label" >
                              <el-input
                                v-model="form[its.value]"
                                placeholder="例如：2005124544124551"
                              />
                            </el-form-item>
                            </el-form-item>
                           <el-form-item :label="item.label" v-if="item.type=='checkbox'&&form[item.value]!=''">
                              <el-checkbox-group v-model="form.zhuanliArr">
                                <el-checkbox
                                  v-for="items in item.children"
                                  :key="items.id"
                                  :label="items.label"
                                  >{{ items.label }}</el-checkbox
                                >
                              </el-checkbox-group>
                            </el-form-item>
                         </el-col>
               </el-row>
            </el-form>
    </div>
  </div>
</template>
<script>
import { buildSearch,temList, temOne } from "@api/quick";
export default {
  data() {
    return {
      // 模板
      options: [
        {
          value: "1",
          label: "我的模板1",
        },
        {
          value: "2",
          label: "我的模板2",
        },
        {
          value: "3",
          label: "我的模板3",
        },
      ],
      value: "",
      hxactiveName:'fushen',
      // 搜索
      restaurants: [],
      state: "",
      timeout: null,
      // 多选
      checkList: [
        { id: 1, name: "十大案件", checked: true },
        { id: 2, name: "优秀案件", checked: true },
        { id: 3, name: "典型案例", checked: false },
        { id: 4, name: "质保优秀案件", checked: false },
      ],
      checked: [1, 2],
      activeNames: ["1"],
      form: {
        name: "",
        shenqinghao:'',
        zhufenleihao:'',
        qitafenleihao:'',
        shenqingri:'',
        gongkaigonggaohao:'',
        gongkaigonggaori:'',
        guobieshenshidaima:'',
        shenqingrenxingming:'',
        shenqingrenyingwenmingcheng:'',
        shenqingrenguobie:'',
        shenqingrenshengfen:'',
        shenqingrenchengshi:'',
        shenqingrenleixing:'',
        famingrenguobie:'',
        famingrenxingming:'',
        famingrenyingwenmingcheng:'',
        faming:[],
        shiyong:[],
        xinxing:[],
        waiguan:[],
        youxianquanxiangshu:'',
        youxianquanri:'',
        youxianquanhao:'',
        youxianquanguo:'',
        youwuzhuanlidaili:'',
        zhuanlidailijigoumingchen:'',
        zhuanlidailijigoudaima:'',
        zhuanlidailirenxingming:'',
        shifouweifenanmuanshenqing:'',
        fenanmuanleixing:'',
        fenan:'',
        muan:'',
        zhuluxiangmushifoubiangeng:'',
        zhuluxiangmubiangengneirong:[],
        shenqingren:[],
        famingren:[],
        famingmingcheng:[],
        IPC:[],
        shifouweiPCIshenqing:'',
        guojishenqinghao:'',
        guojigongkaihao:'',
        shenchayuanxinxi:'',
        shishenshenchayuanbumen:'',
        shishenshenchayuanxingming:'',
        shishenshenchayuandaima:'',
        heyizuzhangbumen:'',
        heyizuzhangdaima:'',
        zhushenbumen:'',
        zhushenxingming:'',
        zhushendaima:'',
        canshenbumen:'',
        canshenxingming:'',
        canshendaimai:'',
        shifoufachuchengyuanbiangengtongzhi:'',
        heyizuzhangxingming:'',
        huibiqingqiujielun:'',
        tongyihuibi:'',
        butongyihuibi:'',

        zhuanlileixing:[],
        famingrenguobie:'',
        shifouyouyouxianquan:'',
        zhegeshiduoxuan:[],
        zhuanliArr: [],
      },
      zhuanliList: [
        { id: 1, name: "发明" },
        { id: 2, name: "实用新型" },
        { id: 3, name: "外观" },
      ],
      radioArr: [
        { id: 1, value: "是" },
        { id: 1, value: "否" },
      ],
      isActive: false,
      showMe:false,    // 悬浮框的显示  true显示检索内容
      xdata:[],
      xdataobj:[],
      dataSource:"fushen",
      dialogFormVisible:false,
      DialogForm:{
        name:""
      },
      htmlBDS:'',
      htmlshowBDS:'',
    };
  },
  created(){
    // this.getList()
    // this.getLeft()
  },
  updated(){
    this.htmlBDS=this.$refs.hardBds.innerText;
  },
  mounted() {
    this.restaurants = this.loadAll();
    this.htmlBDS=this.$refs.hardBds.innerText;
    
  },
  watch:{
    htmlBDS(val){
       console.log(val,this.$refs.hardBds.innerText)
       if(this.htmlBDS.substring(this.htmlBDS.length-3)=='and'){
         this.htmlshowBDS=this.htmlBDS.slice(0,this.htmlBDS.length-3)
         console.log(this.htmlshowBDS)
       }
    }
  },
  methods: {
    //表达式按钮点击
    BtnClick(obj){
      console.log(obj)
      this.DialogForm.name+=obj
    },
    qzshuanxin(){
      this.$forceUpdate();
    },
    //编辑表达式
    editBDS(){
      this.dialogFormVisible=true;
      console.log(this.$refs.hardBds.innerText)
      let zzbds = '';
      // this.DialogForm.name='';
      for(let i = 0;i<this.checkList.length;i++){
        if(this.checkList[i].checked==true){
          zzbds+= this.checkList[i].name+'=是 and'       
          }
      }
      for(let i = 0;i<this.xdataobj.length;i++){
        console.log(this.form[this.xdataobj[i].value])
          if(this.xdataobj[i].type!='radio'&&this.xdataobj[i].type!='checkbox'&&this.xdataobj[i].type!='datetime'&&this.form[this.xdataobj[i].value]!=''&&this.form[this.xdataobj[i].value]!=undefined){
          zzbds+= this.xdataobj[i].label+"='%"+ this.form[this.xdataobj[i].value]+"%'and"      
          }
          if(this.xdataobj[i].type=='datetime'&&this.form[this.xdataobj[i].value]!=''&&this.form[this.xdataobj[i].value]!=undefined){
          zzbds+= this.xdataobj[i].label+"=BETWEEN"+ this.form[this.xdataobj[i].value]+"and"      
          }
          if(this.xdataobj[i].type=='radio'&&this.form[this.xdataobj[i].value]!=''&&this.form[this.xdataobj[i].value]!=undefined){
          zzbds+= this.xdataobj[i].label+"='"+ this.form[this.xdataobj[i].value]+"'and"
          for(let j=2;j<this.xdataobj[i].children.length;j++){
            if(this.form[this.xdataobj[i].children[j].value]!=''&&this.form[this.xdataobj[i].children[j].value]!=undefined){
              zzbds+= this.xdataobj[i].children[j].label+"='%"+ this.form[this.xdataobj[i].children[j].value]+"%'and"
            }
          }      
          }
          if(this.xdataobj[i].type=='checkbox'&&this.form[this.xdataobj[i].value].length>0){
          zzbds+= this.xdataobj[i].label+"='"+ this.form[this.xdataobj[i].value].toString()+"'and"      
          }
      }
      
      if(this.DialogForm.name==''){
        if(zzbds!=''){
          this.DialogForm.name=zzbds.substring(0,zzbds.length-3)
        }
        
      }
    },
    

    //获取模板列表
   async getList(){
     let obj={
      mobanlx:this.hxactiveName
     };
      try{
        const { code,data } = await temList(obj);
      if (code == 200) {
        this.$message.success("获取列表成功");
        this.options =data;
        this.value = data[0].mobanid
        this.getOne()
      } else {
        this.$message.error("获取列表失败");
      } 
      }catch (err) {
        console.log(err)
      }
    },
    //获取模板内容
   async getOne(){
     this.fromData=[];
     let obj = {mobanid:this.value};
      try{
        const { code,data } = await temOne(obj);
      if (code == 200) {
        this.$message.success("获取信息成功");
        this.xdata=[];
        this.xdata=JSON.parse(data.jiansuoxmb);
        this.xdataobj=this.xdata[0].children;
        console.log(this.xdata,this.xdataobj)
      } else {
        this.$message.error("获取信息失败");
      } 
      }catch (err) {
        console.log(err)
      }
    },
     //获取模板内容
   async getLeft(){
     let obj = {mobanid:this.value};
      try{
        const { code,data } = await temOne(obj);
      if (code == 200) {
        this.$message.success("获取信息成功");
        this.xdata=[];
        this.xdata=JSON.parse(data.jiansuoxmb).fromdata;
        this.xdataobj=this.xdata[0].children;
        console.log(this.xdataobj,this.form.shifouweifenanmuanshenqin)
      } else {
        this.$message.error("获取信息失败");
      } 
      }catch (err) {
        console.log(err)
      }
    },
    //右侧悬浮框点击
    xRightClick(){
      this.showMe = !this.showMe;
    },
    //高级检索
    async _buildSearch() {
      const { state, dataSource } = this;
      const results = await buildSearch({ state, dataSource });
      console.log(results);
      return results.data || [];
    },
    async gotoInfo() {
      if (!this.state) {
        return this.$message.warning("请输入检索关键字");
      }
      const expList = await this._buildSearch();
      this.$router.push({
        path: "/pages/list",
        query: {
          expList,
          dataSource: this.dataSource,
        },
      });
    },
    //高级搜索下面的点击时间
    checkRow(arr, i) {
      console.log(arr);
      for (let i = 0; i < this.checkList.length; i++) {
        if (arr.indexOf(this.checkList[i].id) != -1) {
          this.checkList[i].checked = true;
        } else {
          this.checkList[i].checked = false;
        }
        this.$forceUpdate();
      }
    },
    skipping() {
      this.$router.push({ path: "legal-question-search" });
    },
    handleClick(tab, event) {
      console.log(tab, event);
      console.log(this.hxactiveName)
      this.getList()
    },
    loadAll() {
      return [
        { value: "申请号", address: "4" },
        {
          value: "主分类号",
          address: "2",
        },
      ];
    },
    querySearchAsync(queryString, cb) {
      var restaurants = this.restaurants;
      var results = queryString
        ? restaurants.filter(this.createStateFilter(queryString))
        : restaurants;

      clearTimeout(this.timeout);
      this.timeout = setTimeout(() => {
        cb(results);
      }, 3000 * Math.random());
    },
    createStateFilter(queryString) {
      return (state) => {
        return (
          state.value.toLowerCase().indexOf(queryString.toLowerCase()) === 0
        );
      };
    },
    handleSelect(item) {
      console.log(item);
    },
   async onSubmit() {
      console.log("submit!");
      const expList = await this._buildSearch();
      this.$router.push({
        path: "/pages/list",
        query: {
          expList,
          dataSource: this.dataSource,
        },
      });
    },
  },
};
</script>
<style lang="scss">

$main-color: #303133;
$blue-color: #2d54b8;
$border-color: #dcdfe6;
.search-content {
  .el-form-item__label {
    font-size: 14px;
  }
  .el-tabs--border-card {
    border: 0;
    border-radius: 6px;
    box-shadow: none;
  }
  .el-tabs--border-card > .el-tabs__header .el-tabs__item {
    border: 1px solid $border-color;
    margin-top: 0;
    color: $blue-color;
    border-radius: 6px 6px 0 0;
    margin-right: 10px;
    border-bottom: 0;
    background-color: #ebeef5;
    font-size: 16px;
  }
  .el-tabs--border-card > .el-tabs__header {
    background-color: #f7f7f7;
    margin-top: -1px;
    border-bottom: 1px solid $border-color;
  }
  .el-tabs--border-card > .el-tabs__header .el-tabs__item.is-active {
    color: $main-color;
    background-color: #fff;
  }
  .el-tabs--border-card > .el-tabs__header .el-tabs__item + .el-tabs__item,
  .el-tabs--border-card > .el-tabs__header .el-tabs__item:first-child {
    margin-left: 0;
  }
  .el-tabs--border-card > .el-tabs__content {
    border-left: 1px solid $border-color;
    border-right: 1px solid $border-color;
    border-bottom: 1px solid $border-color;
    padding: 20px;
  }
}
.search-filter-params-b {
  .el-checkbox__input.is-checked .el-checkbox__inner,
  .el-checkbox__input.is-indeterminate .el-checkbox__inner {
    background-color: $blue-color;
    border-color: $blue-color;
  }
  .el-checkbox__input.is-checked + .el-checkbox__label {
    color: $main-color;
  }
  .el-checkbox__label {
    font-size: 14px;
  }
}
.search-content {
  .search-form {
    margin-top: 20px;
  }
  .el-collapse {
    border: 0;
  }
  .search-item {
    .el-collapse-item__wrap {
      border-bottom: 0;
    }
    .el-collapse-item__content {
      padding-bottom: 0;
    }
    .el-collapse-item__header {
      height: 50px;
      line-height: 50px;
      background-color: #ebeef5;
      color: #303133;
      cursor: pointer;
      border-bottom: 0;
      font-size: 18px;
      font-weight: 700;
      padding-left: 14px;
      position: relative;
      &::before {
        content: "";
        position: absolute;
        left: 0;
        top: 17px;
        z-index: 1;
        width: 4px;
        height: 16px;
        background-color: $blue-color;
      }
    }
  }
  .el-input__inner {
    height: 36px;
    line-height: 36px;
    border: 1px solid $border-color;
    background-color: #fafafa;
    font-size: 14px;
  }
  .el-date-editor .el-range-input,
  .el-date-editor .el-range-separator {
    background-color: #fafafa;
    font-size: 14px;
  }
  .el-date-editor .el-range-input {
    width: 43%;
  }
  .el-checkbox__inner,
  .el-radio__inner {
    width: 18px;
    height: 18px;
  }
  .el-checkbox__inner::after {
    left: 6px;
    top: 2px;
  }
}
.search-submit-btn {
  .el-form-item__content {
    font-size: 14px;
    text-align: center;
    margin: 0 auto !important;
  }
  .el-button {
    padding: 10px 12px;
    font-size: 14px;
    color: $main-color;
    i {
      margin-right: 10px;
    }
  }
  .el-button--primary {
    background-color: $blue-color;
    border-color: $blue-color;
    padding-left: 80px;
    padding-right: 80px;
    color: #ffffff;
    &:focus,
    &:hover {
      background: #66b1ff;
      border-color: #66b1ff;
      color: #fff;
    }
  }
}
</style>
<style lang="scss" scoped>
$main-color: #303133;
$blue-color: #2d54b8;
$border-color: #dcdfe6;
.el-select-dropdown__item {
  font-size: 14px;
}
.search-wrapper,
button,
input,
optgroup,
select,
textarea {
  font-family: "PingFang SC", Microsoft YaHei, Arial, sans-serif !important;
}
.search-wrapper {
  margin: 0 auto;
  width: 1200px;
  overflow: hidden;
  color: $main-color;
  font-size: 14px;
}
.search-title {
  margin-top: 20px;
  overflow: hidden;
  .search-title-l {
    font-size: 22px;
    float: left;
  }
  .search-title-r {
    float: right;
    .earch-title-label {
    }
    .el-button {
      margin-left: 20px;
      i {
        margin-right: 10px;
        font-size: 14px;
      }
    }
    .el-button--medium {
      padding: 10px 12px;
    }
  }
}
.search-filter {
  margin-top: 15px;
  background-color: #ffffff;
  border: 1px solid $border-color;
  border-radius: 6px;
  padding: 20px;
  .search-filter-title {
    font-size: 18px;
    font-weight: 700;
    position: relative;
    height: 16px;
    line-height: 16px;
    padding-left: 14px;
    &::before {
      content: "";
      position: absolute;
      left: 0;
      top: 0;
      z-index: 1;
      width: 4px;
      height: 100%;
      background-color: $blue-color;
    }
  }
  .search-filter-params {
    margin: 20px 0 0 14px;
    overflow: hidden;
    .search-filter-params-t {
      .el-autocomplete {
        margin-right: 12px;
        width: 60%;
      }
      .el-button {
        margin: 0 20px 0 0;
        padding: 10px 12px;
        font-size: 14px;
      }
      .el-button--primary {
        background-color: $blue-color;
        &:focus,
        &:hover {
          background: #66b1ff;
          border-color: #66b1ff;
        }
      }

      i {
        margin-right: 10px;
      }
    }
    .search-filter-params-b {
      margin: 18px 0 20px 0;
      .el-checkbox {
        margin-right: 40px;
      }
    }
  }
  .search-filter-tips {
    margin-top: 10px;
    background-color: #ebeef5;
    color: $blue-color;
    // height: 54px;
    line-height: 24px;
    padding: 10px 20px;
    .search-filter-tips-text {
      // float: left;
      display: inline-block;
      width:92%;
      // min-height:40px;
    }
    .search-filter-tips-edit {
      float: right;
      color: $blue-color;
      cursor: pointer;
      i {
        margin-right: 12px;
        font-size: 14px;
      }
      &:hover,
      &:focus {
        color: #66b1ff;
      }
    }
  }
}
.search-content {
  position: relative;
  .search-more-btn {
    cursor: pointer;
    position: absolute;
    right: 0;
    top: 0;
    z-index: 1;
    color: $blue-color;
    font-size: 14px;
    i {
      margin-left: 10px;
      font-size: 14px;
    }
  }
}

.search-content {
  margin-top: 20px;
  .el-form-item {
    min-height: 40px;
    margin-bottom: 18px;
  }
  .el-form-item__label,
  .el-input__inner,
  .el-checkbox__label,
  .el-radio__label {
    font-size: 14px;
    color: $main-color;
  }
  .el-range-editor.el-input__inner {
    width: 100%;
  }
}
.search-body {
  margin: 0 0 10px 0;
  .search-submit-btn {
    margin-bottom: -10px;
  }
  .search-item {
    margin-bottom: 20px;
  }
}
</style>

